home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / MPW / indent 1.8 / memcpy.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-16  |  348 b   |  19 lines  |  [TEXT/MPS ]

  1. /* Copy LEN bytes starting at SRCADDR to DESTADDR.  Result undefined
  2.    if the source overlaps with the destination.
  3.    Return DESTADDR. */
  4.  
  5. #ifdef USG
  6. char *
  7. memcpy (destaddr, srcaddr, len)
  8.      char *destaddr;
  9.      char *srcaddr;
  10.      int len;
  11. {
  12.   char *dest = destaddr;
  13.  
  14.   while (len-- > 0)
  15.     *destaddr++ = *srcaddr++;
  16.   return dest;
  17. }
  18. #endif
  19.